package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author itcast
 */
@RestController("operationAaWorkerCertificationController")
@RequestMapping("/operation/agency-certification-audit")
@Api(tags = "运营端 - 服务人员认证信息相关接口")
public class AaWorkerCertificationController {

    @Resource
    private IWorkerCertificationService workerCertificationService;


    @Resource
    IAgencyCertificationService agencyCertificationService;


    @GetMapping("/page")
    @ApiOperation("企业认证分页查询")
    public PageResult<AgencyCertificationAuditResDTO> page(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO) {
//        return agencyCertificationService.pageList(agencyCertificationAuditPageQueryReqDTO);

        PageResult<AgencyCertificationAuditResDTO> pageResult = agencyCertificationService.pageList(agencyCertificationAuditPageQueryReqDTO);

        pageResult.setList(List.of(pageResult.getList().get(0)));
        return pageResult;

    }






}
